/*
 * @Author: deng da chao
 * @Date: 2022-05-24 09:12:10
 * @LastEditTime: 2023-03-24 11:10:06
 * @Description: 商品接口
 */
import http from '../../utils/http'

// nft商品列表
const getNftPage = (data) => {
  return http.get('/nft/page', data)
}

// nft商品详情
const getNftId = (data) => {
  return http.get(`/nft/${data.id}`, data)
}

// 集市详情
const getMarketDetail = (data) => {
  return http.get(`/nft/marketDetail/${data.memberNftId}`, data)
}


// 显示专题列表 1商品专题 2盒子专题 3视频专题 4文章专题 7nft商品
const getThemeList = (data) => {
  return http.get(`/marketing/themeList/${data.themeType}`)
}

// 显示专题内容列表
const getThemeNftContentList = (data) => {
  return http.get(`/marketing/themeNftContentList`, data)
}

// 盲盒详情
const getBoxAppBoxDetail = (data) => {
  return http.get(`/box/appBox/detail`, data)
}

// 盲盒记录
const getOpenRecords = (data) => {
  return http.get(`/box/appBox/openRecords`, data)
}

// 盲盒奖池
const getBoxAppBoxPrizeDetail = (data) => {
  return http.get(`/box/appBox/prizeDetail`, data)
}

// 盲盒开奖结果
const getOpenResult = (data) => {
  return http.get(`/box/appBox/openResult`, data)
}


// 会员NFT绑定数据流转记录,传SysMemberNftId
const getCirculationList = (data) => {
  return http.get(`/member/sysMemberNft/getCirculationList`, data)
}

// 获取NFT列表排序配置
const getMarketingNftList = (data) => {
  return http.get(`/marketing/nftList`, data)
}

// 获取精选内容列表
const getMarketingThemePageReco = (data) => {
  return http.get(`/marketing/themePageReco/pageList`, data)
}

// 获取日历发售列表
const getNftSellCalendarSend = (data) => {
  return http.get(`/nft/nftSellCalendar/send`, data)
}

// nft日历详情
const getNftSellCalendarCalendarDetail = (data) => {
  return http.get(`/nft/nftSellCalendar/calendarDetail/${data.id}`, data)
}

//获取分类列表
const getcategoryList = (data) => {
  return http.get(`/category/treeList`, data)
}

//获取资讯分类列表
const getCategoryCategoryList = (data) => {
  return http.get(`/category/categoryList`, data)
}


// 赠品详情
const getNftGift = (data) => {
  return http.get(`/nft/gift/${data.id}`, data)
}



// 获取用户hash值
const getNftDDC = (data) => {
  return http.get(`/nft/getDDC`, data)
}

// 获取哈希值排队
const getNftLineUp = (data) => {
  return http.get(`/nft/lineUp`, data)
}

// 获取哈希值排队
const getArticle = (data) => {
  return http.get(`/marketing/themePage/getArticle`, data)
}


// 首页专题
const getMarketingHomeTheme = (data) => {
  return http.get(`/marketing/homeTheme`, data)
}

//查看掉落详情
const getNftRandomFallingPrize = (data) => {
  return http.get(`/nft/nftRandomFallingPrize/query/${data.nftId}`, data)
}

//判断售卖风险提示
const getCheckSellTip = (data) => {
  return http.get(`/member/sysMemberNft/checkSellTip`, data)
}

//判断购买风险提示
const getCheckBuyTip = (data) => {
  return http.get(`/member/sysMemberNft/checkBuyTip`, data)
}


// 收藏-取消-详情页单个商品收藏及取消收藏
const postCollectionDo = (data) => {
  return http.post(`/nft/user/collection/do`, data)
}

// 我的收藏
const getCollectionMyList = (data) => {
  return http.get(`/nft/user/collection/my/list`, data)
}

// 批量取消收藏-我的收藏页
const postCollectionUndoDatch = (data) => {
  return http.post(`/nft/user/collection/undo/batch`, data)
}

export default {
  getNftPage,
  getNftId,
  getMarketDetail,
  getThemeList,
  getThemeNftContentList,
  getBoxAppBoxDetail,
  getOpenRecords,
  getCirculationList,
  getMarketingNftList,
  getMarketingThemePageReco,
  getNftSellCalendarSend,
  getNftSellCalendarCalendarDetail,
  getcategoryList,
  getCategoryCategoryList,
  getNftGift,
  getNftDDC,
  getNftLineUp,
  getArticle,
  getMarketingHomeTheme,
  getNftRandomFallingPrize,
  getCheckSellTip,
  getCheckBuyTip,
  getBoxAppBoxPrizeDetail,
  getOpenResult,
  postCollectionDo,
  getCollectionMyList,
  postCollectionUndoDatch
}
